(function (args) {
    "use strict";

    angular.module('core').factory('baseService', factory);
    factory.$inject = ['$http', '$q'];

    function factory($http, $q) {

        return {
            getAllAcompanhamento: function (args) {
                var deferred = $q.defer();
                $http.post('/_base/getAllBaseAcompanhamento', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
            getAllComentario: function (args) {
                var deferred = $q.defer();
                $http.post('/_base/getAllBaseComentario', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
            getAllCompartilhamento: function (args) {
                var deferred = $q.defer();
                $http.post('/_base/getAllBaseCompartilhamento', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
            getAllAnexo: function (args) {
                var deferred = $q.defer();
                $http.post('/_base/getAllBaseAnexo', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
            getAllTag: function (args) {
                var deferred = $q.defer();
                $http.post('/_base/getAllBaseTag', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
        };
    }

})();


